/*****************************************************************************
*
*  PROJECT:     SlipStream
*               (Timer Classes)
*  LICENSE:     GNU General Public License v3 - http://www.gnu.org/licenses/gpl.html

*  DEVELOPERS:  Philip Farquharson	<B00137077@studentmail.uws.ac.uk>
*				John Gray			<B00145524@studentmail.uws.ac.uk>		
*				Zohaib Bhatti		<B00104280@studentmail.uws.ac.uk>
*				Euan Hislop			<B00138636@studentmail.uws.ac.uk>
*
*****************************************************************************/
#ifndef CTIMER_H
#define CTIMER_H

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

typedef void (*TimerCallback)(int iteration, int value);

class CTimer
{
private:
	TimerCallback CallBack;
	unsigned int ms, startTick;
	int repeat, ticked, value;
public:
	CTimer ( TimerCallback CallBack, unsigned int ms, int repeat, int value );
	~CTimer ( void );

	void Tick ( void );

	int getMS ()							{ return ms; }
	int getStartTick ()						{ return startTick; }
	int getRepeat ()						{ return repeat; }
	int getTicked ()						{ return ticked; }
	int getValue ()							{ return value; }
	void setStartTick ( int tick )			{ startTick = tick; }

	int getTimeUntilTick();
};
#endif